#include<stdbool.h>

bool canPermutePalindrome(char* s) {
    int arr[256] = { 0 };
    int ev = 0;
    int odd = 0;
    while (*s)
    {
        arr[*s]++;
        s++;
    }
    for (int i = 0; i < 256; i++)
    {
        if (arr[i] == 1)
        {
            odd++;
        }
        if (arr[i] > 2)
        {
            return false;
        }
    }
    if (odd == 1)
    {
        return true;
    }
    return false;
}
int main()

{
    char s[] = "carerac";
    int jud = canPermutePalindrome(s);
    return 0;
}
